A number of electronic devices, including personal computers, include drives for floppy disks or other removable data recording media. In a number of situations it would be useful if the computer or other apparatus could determine whether the medium has been replaced, e.g., whether a floppy disk or "diskette" has been removed from the disk drive and another (or the same) floppy disk has been inserted into the disk drive. As one example, when loading into the apparatus large programs or large blocks of data recorded on multiple diskettes, it would be useful if the apparatus, after prompting a user to insert the next diskette, could sense the (probable) insertion of the new diskette without requiring the user to separately indicate insertion of the new diskette, such as through a user input device like the keyboard or a mouse. It has not been feasible to provide this function in previous devices.
Some disk drives currently in use provide a door-open or "changeline" status signal which, under certain circumstances, provides an indication of the status of the drive door, i.e., whether the drive door is open or closed. The signal is often termed the "disk change" signal. However, this term is something of a misnomer since, in the present configuration of drives and computers, it is impractical or inconvenient to use the so-called disk change signal to provide information regarding whether a new disk has been inserted. The impracticality arises from the original purpose of the door-open status signal. The purpose of the door-open status signal was to permit the operating system to control the disk drive more efficiently. As long as a given disk remains in the disk drive, the operating system can use, in all further disk access operations, the directory and file allocation information which it initially read from the diskette and stored. This avoids the necessity for moving the head to the outermost cylinder to read the directory and allocation information before each access of a requested disk location. Head motion is time consuming and excessive head movement contributes to inefficiency of floppy disk operations, and results in wear of the drive mechanism. As long as the door has not been opened, it can be assumed that the same diskette resides in the drive and unnecessary head motion can be avoided by using the stored directory and file allocation information.
Since the purpose of providing door-open status information was to ascertain whether or not the door has been opened, little attention was given to providing an efficient and practical way of determining whether, following a door opening, the door has later been closed. In one common type of configuration, a floppy disk controller controls one to three disk drives via a set of multiplexed input signals, a set of multiplexed output signals, and a group of radial "drive select" signals. Each drive responds to certain input signals or drives output signals only when the drive is selected. Among the multiplexed input signals are the "step pulse" signal and the "direction" signal. The "step pulse" signal, in general, causes the head to move radially to an adjacent track or "cylinder". The direction of movement (i.e., radially inward or radially outward) is determined by the "direction" signal.
One of the output signals is the door-open status or so-called "disk change" signal. When a disk drive is selected, the disk drive places an indication of the door status on the door-open status line. In the usual case, the door-open status line is "true" if the door is open (typically indicating no disk is present in the drive). If the door is open and the disk drive receives a step pulse while it is selected, the door-open status remains "true". If, following a door opening, a disk is inserted in the drive and the door is closed, the status will remain "true" until the drive receives a step pulse (while it is selected). If, following a door opening, a disk is inserted, the drive door is closed and a step pulse is issued to the drive, the door-open status signal will be updated, i.e., the door-open status signal will be driven "false" indicating that the door is closed and, typically, a disk is present in the drive.
In a typical personal computer system, the described configuration is used to routinely obtain door-open status information during disk operations for the purpose of providing efficient drive control. This function is handled by the basic input/output system (BIOS), stored in read only memory (ROM). BIOS can determine whether a particular disk drive is a model which provides door-open status information. Each time the operating system requests the BIOS to access a drive which provides door-open status information, the BIOS first polls the door-open status line. If it is "false" (indicating the door has not been opened) the BIOS performs the requested operation (e.g., read a sector, write a sector, or return door-open status). If the disk change status is "true" (indicating the door has been opened), the BIOS returns a status code to the operating system indicating that the door-open status is true. If a read or write operation was requested, that operation is aborted. After returning an indication that the door-open status is "true" BIOS issues a step pulse to the drive to update the door-open status line, in case a new disk has been inserted and the door has been closed. If a new disk has been inserted and the door closed, the door-open status will become "false" after issuance of the step pulse as described above. Thereafter, when the operating system requests BIOS to access the drive, the door-open status will be indicated as "false" (indicating the door is closed) and a requested operation would take place.
Using the described configuration, it is possible to detect when, following a door opening, the door has subsequently been closed. This would involve repeatedly issuing step pulses followed by polls of the door-open status line.